﻿namespace Amazon.Checkout
{
    using Orchard.Localization;
    using Orchard.UI.Navigation;
  using Orchard.Security;

    public class AdminMenu : INavigationProvider
    {
        public AdminMenu()
        {
            this.T = NullLocalizer.Instance;
        }

        public Localizer T { get; set; }

        public string MenuName { get { return "admin"; } }

        public void GetNavigation(NavigationBuilder builder)
        {
            builder.AddImageSet("amazon")
                .Add(
                this.T("Amazon"),
                "20",
                menu => menu.Add(
                                    this.T("Promotions"),
                                    "1.0",
                                    item => item.Action("List", "Promotions", new { area = "Amazon.Checkout" }).Permission(StandardPermissions.AccessAdminPanel))
                            .Add(
                                    this.T("Tax Tables"),
                                    "2.0",
                                    item => item.Action("List", "TaxTable", new { area = "Amazon.Checkout" }).Permission(StandardPermissions.AccessAdminPanel))
                            .Add(
                                    this.T("Shipping Methods"),
                                    "3.0",
                                    item => item.Action("List", "Shipping", new { area = "Amazon.Checkout" }).Permission(StandardPermissions.AccessAdminPanel))
                            .Add(
                                    this.T("Settings"),
                                    "3.0",
                                    item => item.Action("Settings", "Admin", new { area = "Amazon.Checkout" }).Permission(StandardPermissions.AccessAdminPanel)));
        }
    }
}